package com.swift.utils;


import java.util.HashMap;
import java.util.Map;

import android.os.Bundle;

public class WebViewBundle {
	public static String KEY = "key";
	public static String JS_INTEFACE = "jsInteface";
	Map<String, Object> keyMap = new HashMap<String, Object>(); 
	SerializableMap serializableKeyMap = new SerializableMap();
	Map<String, Object> jsIntefaceMap = new HashMap<String, Object>(); 
	SerializableMap serializableJsIntefaceMap = new SerializableMap();
	
	public void addKeyMap(String key,String value)
	{
		keyMap.put(key, value);
	}
	
	public void addJsIntefaceMap(String key,Object value)
	{
		jsIntefaceMap.put(key, value);
	}
	
	public Bundle build()
	{
		serializableKeyMap.setMap(keyMap);
		serializableJsIntefaceMap.setMap(jsIntefaceMap);
		Bundle bundle = new Bundle();
		bundle.putSerializable(KEY, serializableKeyMap);
		bundle.putSerializable(JS_INTEFACE, serializableJsIntefaceMap);
		return bundle;
	}
}
